/**
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
*/

import request from '@/utils/request';

// 模型模板列表
export function getDatabaseTemplateList(param) {
  return request({
    url: '/isfd/databaseModelingTemplate/list',
    method: 'post',
    data: param
  });
}
// 保存模板
export function saveDatabaseTemplate(param) {
  return request({
    url: '/isfd/databaseModelingTemplate/save',
    method: 'post',
    data: param
  });
}
// 删除模板
export function deleteDatabaseTemplate(id) {
  return request({
    url: `/isfd/databaseModelingTemplate/${id}`,
    method: 'delete'
  });
}   
// 获取单个模板
export function getDatabaseTemplateDetail(id) {
  return request({
    url: `/isfd/databaseModelingTemplate/${id}`,
    method: 'get',
  });     
}

// 模板导出
export function exportModelTemplate(id) {
  return request({
    url: '/isfd/databaseModelingTemplate/out-excel/'+id,
    method: 'get',
    // params: param,
    responseType: 'blob'
  });
}

// 模板导入
export function importModelTemplate(param) {
  return request({    
    url: '/isfd/databaseModelingTemplate/import-excel',
    method: 'post',
    data: param
  });     
}

// 模板json文件导出
export function exportModelJSONTemplate(id) {
  return request({
    url: '/isfd/databaseModelingTemplate/out-json/'+id,
    method: 'get',
    // params: param,
    responseType: 'blob'
  });
}